Skip to content

[codex] publish fbuild usb vidpid overlay#907

Draft
zackees wants to merge 3 commits into
mainfrom
codex/usb-vid-proto-online-data
Draft

[codex] publish fbuild usb vidpid overlay#907
zackees wants to merge 3 commits into
mainfrom
codex/usb-vid-proto-online-data

Conversation

@zackees

@zackees zackees commented Jul 1, 2026

Copy link
Copy Markdown
Member

What changed

  • Add online-data-tools/build_usb_vid_proto.py to encode merged usb-vid.json into the usb-vids.proto.zstd protobuf/zstd runtime artifact that fbuild_core::usb already knows how to read.
  • Wire Update data to publish data/usb-vids.proto.zstd on the online-data branch whenever the USB merge succeeds.
  • Move USB_VIDS_PROTO_ZSTD_URL from fastled.github.io/boards to the fbuild online-data branch.
  • Surface CDC classification through fbuild port scan, daemon DeviceState, device list/status API responses, and CLI fbuild device output.
  • Document source precedence: third-party SDK/package rows are weak supplemental inputs that fill gaps only; local FastLED board data and first-party/vendor sources remain stronger.

Why

The runtime scan path was fetching a compact VID/PID overlay from fastled.github.io/boards, while this repo's online-data workflow only published JSON/SQLite/vendor artifacts. That left fbuild dependent on an external board artifact for product-level VID/PID resolution. This makes fbuild publish and consume its own compact artifact.

The device surfaces also exposed vendor/product but not the requested CDC-vs-bridge signal. The new nullable is_cdc field reports true for CDC ACM, false for USB serial bridge, and null when the host cannot classify the port.

Follow-up note

First-party repo board data remains the support boundary: if a board is not present under crates/fbuild-config/assets/boards, it may not exist as an fbuild-supported board. Remaining product-PID gaps should be researched from internet/vendor sources only for boards that are present in that repo board set; third-party SDK/package findings can weakly fill missing VID/PID names but must not override first-party, vendor-owned, or generic USB-ID winners.

Validation

  • uv run --no-project --with pytest --with zstandard pytest online-data-tools/test_usb_vid_proto.py -q
  • soldr cargo test -p fbuild-core usb::data --lib
  • soldr cargo test -p fbuild-cli port_scan --lib
  • soldr cargo test -p fbuild-cli cdc_suffix --lib
  • soldr cargo test -p fbuild-daemon device_manager --lib
  • soldr cargo test -p fbuild-daemon deploy_port --lib
  • soldr cargo test -p fbuild-cli --lib
  • soldr cargo test -p fbuild-daemon --lib
  • soldr cargo test -p fbuild-serial --lib
  • soldr cargo test -p fbuild-packages --lib
  • soldr cargo clippy -p fbuild-serial --all-targets -- -D warnings
  • soldr cargo clippy -p fbuild-build --tests -- -D warnings
  • soldr cargo doc -p fbuild-build --no-deps with RUSTDOCFLAGS=-D warnings
  • soldr cargo doc -p fbuild-cli --no-deps with RUSTDOCFLAGS=-D warnings
  • docker run --rm -v "${PWD}:/work" -w /work rust:1.94.1 bash -lc "export PATH=/usr/local/cargo/bin:$PATH; cargo fmt --all -- --check"
  • uv run --no-project python ci/render_workflows.py --check
  • uv run --no-project python -m py_compile ci/validate_boards.py
  • git diff --check

Also generated the artifact from the current published usb-vid.json: 1,946 vendors, 22,258 products, 260,305-byte usb-vids.proto.zstd.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 756ff86b-b9b0-4136-a8f6-fc53c5976665

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/usb-vid-proto-online-data

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees zackees force-pushed the codex/usb-vid-proto-online-data branch 18 times, most recently from e86690f to cb0c99c Compare July 1, 2026 04:32
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 1, 2026
@zackees zackees force-pushed the codex/usb-vid-proto-online-data branch 9 times, most recently from 02acb32 to 5bc737f Compare July 1, 2026 06:05
@zackees zackees force-pushed the codex/usb-vid-proto-online-data branch 19 times, most recently from ce74c01 to 7d334d8 Compare July 1, 2026 12:59
@zackees zackees force-pushed the codex/usb-vid-proto-online-data branch from 7d334d8 to 40d9c9e Compare July 1, 2026 13:21
zackees and others added 2 commits July 1, 2026 06:53
Move the proto-first / JSON-fallback overlay download + install helper into
`fbuild_core::usb::populate_online_cache_from_paths(_and_urls)` so both
`fbuild port scan` and daemon-backed device paths share the same cold-cache
hydration path. The helper still runs the reqwest blocking client on a
dedicated OS thread (safe from Tokio) and uses the shared
`fbuild_core::http::blocking_client` bridge.

`fbuild-cli` now delegates to the shared helper; the local
fetch/cache-freshness scaffolding is deleted and the port_scan test that
exercised the local helper is replaced by a proto-404-then-JSON-200
integration test (kept in the CLI crate) plus a new
`populate_online_cache_falls_back_to_json_when_proto_is_missing` test
in `fbuild-core::usb::data`.

`fbuild-daemon` startup now spawn_blocking's a best-effort call to
`populate_online_cache_from_paths` using `<cache-root>/usb/{usb-vids.proto.zstd,
usb-vid.json}` before device refresh/list can be served, so
`fbuild device list/status/deploy` return full vendor + product names
instead of tier-1 vendor-only + `Device 0xPPPP` placeholder. Any failure
logs at debug/warn and never blocks daemon bootstrap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant